پرش به مطلب اصلی

Reseller Get User by Username API

POST /resellerGetUserByUsername

Description

This API endpoint retrieves detailed information about a user associated with a reseller using their username.

Request Body

The request uses GraphQL to perform the resellerGetUserByUsername query, which requires a username variable to specify the user's username.

Query:

query resellerGetUserByUsername ($username: String) {
resellerGetUserByUsername (username: $username) {
id
email
username
resellerId
role
enabled
radAccess
radAccessClear
createdAt
updatedAt
}
}

GraphQL Variables:

{
"username": ""
}

Example Request:

curl --location '' \
--header 'Content-Type: application/json' \
--data '{"query":"query resellerGetUserByUsername ($username: String) {\n resellerGetUserByUsername (username: $username) {\n id\n email\n username\n resellerId\n role\n enabled\n radAccess\n radAccessClear\n createdAt\n updatedAt\n }\n}","variables":{"username":"username123"}}'

Response:

  • Success (200 OK):

    • The response includes detailed information about the user associated with the given username.
    {
    "data": {
    "resellerGetUserByUsername": {
    "id": 123,
    "email": "user@example.com",
    "username": "username123",
    "resellerId": 45,
    "role": "admin",
    "enabled": true,
    "radAccess": true,
    "radAccessClear": false,
    "createdAt": "2023-01-01T12:00:00Z",
    "updatedAt": "2024-01-01T12:00:00Z"
    }
    }
    }
  • Error (4XX/5XX):

    • If there is an issue with the request or server error, the response will include an error message and status code.

Note:

This endpoint is useful for retrieving specific user details within a reseller's organization by providing their username. Ensure that the username provided is valid to get accurate results.